use chrono::{DateTime, Local};
use serde::{Deserialize, Serialize};
use rbdc::decimal::Decimal;

/// 系统-机构
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SysOrgan {
    /// id
    pub id: Option<i32>,
    /// 上级ID
    pub pid: Option<i32>,
    /// 顶级ID
    pub tid: Option<i32>,
    /// 学员ID
    pub student_id: Option<i32>,
    /// 名称
    pub name: Option<String>,
    /// 名称简拼
    pub name_py: Option<String>,
    /// 密码
    pub password: Option<String>,
    /// 角色权限列表
    pub roles: Option<String>,
    /// 权限范围
    pub roles_scope: Option<i32>,
    /// 权限范围部门
    pub roles_office_list: Option<String>,
    /// 机构代码
    pub orgcode: Option<String>,
    /// 机构类型
    pub org_type: Option<i32>,
    /// 联系人
    pub contacts: Option<String>,
    /// 联系人电话
    pub phone: Option<String>,
    /// 电子邮箱
    pub email: Option<String>,
    /// 地址
    pub address: Option<String>,
    /// 微信ID
    pub weixin_open_id: Option<String>,
    /// 排序
    pub sort: Option<i32>,
    /// 使用上级部门配置
    pub use_up_settings: Option<i32>,
    /// 参数1
    pub params1: Option<i32>,
    /// 参数2
    pub params2: Option<i32>,
    /// 参数3
    pub params3: Option<i32>,
    /// 参数4
    pub params4: Option<i32>,
    /// 参数5
    pub params5: Option<i32>,
    /// 参数6
    pub params6: Option<i32>,
    /// 参数7
    pub params7: Option<i32>,
    /// 参数8
    pub params8: Option<i32>,
    /// 参数9
    pub params9: Option<i32>,
    /// 参数10
    pub params10: Option<i32>,
    /// 参数11
    pub params11: Option<i64>,
    /// 参数12
    pub params12: Option<i64>,
    /// 参数13
    pub params13: Option<i64>,
    /// 参数14
    pub params14: Option<i64>,
    /// 参数15
    pub params15: Option<i64>,
    /// 参数16
    pub params16: Option<String>,
    /// 参数17
    pub params17: Option<String>,
    /// 参数18
    pub params18: Option<String>,
    /// 参数19
    pub params19: Option<String>,
    /// 参数20
    pub params20: Option<String>,
    /// 参数21
    pub params21: Option<String>,
    /// 参数22
    pub params22: Option<String>,
    /// 参数23
    pub params23: Option<String>,
    /// 参数24
    pub params24: Option<String>,
    /// 参数25
    pub params25: Option<String>,
    /// 参数26
    pub params26: Option<String>,
    /// 参数27
    pub params27: Option<String>,
    /// 参数28
    pub params28: Option<String>,
    /// 参数29
    pub params29: Option<String>,
    /// 参数30
    pub params30: Option<String>,
    /// 参数31
    pub params31: Option<Decimal>,
    /// 参数32
    pub params32: Option<Decimal>,
    /// 参数33
    pub params33: Option<Decimal>,
    /// 参数34
    pub params34: Option<Decimal>,
    /// 参数35
    pub params35: Option<Decimal>,
    /// 状态
    pub status: Option<i32>,
}


/// 系统_角色
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SysRole {
    /// id
    pub id: Option<i32>,
    /// 所属公司
    pub company_id: Option<i32>,
    /// 名称
    pub name: Option<String>,
    /// 权限列表
    pub power_list: Option<String>,
    /// 状态
    pub status: Option<i32>,
}

/// 系统-选项参数
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SysOptionParams {
    /// id
    pub id: Option<i32>,
    /// 上级id
    pub pid: Option<i32>,
    /// 名称
    pub name: Option<String>,
    /// 数字值
    pub option_value: Option<i32>,
    /// 字符值
    pub option_key: Option<String>,
    /// 标记
    pub tag: Option<String>,
    /// 图标
    pub icon: Option<String>,
    /// 颜色
    pub color: Option<String>,
    /// 排序
    pub sort: Option<i32>,
    /// 备注
    pub ext: Option<String>,
    /// 状态
    pub status: Option<i32>,
}